const phoneDao=require('../dao/phoneDao');

async function findByKind(kind) {
    // if(kind==null||kind=={}||kind==undefined||kind==[]){
    //     kind='kids';
    // }
    try{
        //查询，能返回
        var data = await phoneDao.findByKind(kind);
        return {success:true,phones:data};
    }catch(e){
        //不能返回
        return {success:false,msg:'database is error!'};
    }
}

exports.findByKind=findByKind;